<?php





function getQueryForKey($queryKey){
require_once("bd_utils.php");
	$obj_utils=new bd_utils();
	$obj_utils->connect();
	switch($queryKey){
		case "general5":
			$query="select * from runner join resultats on runner.id=FK_runner where distance='".$obj_utils->getSmalDistance()."' order by temp";
		break;
		case "man5":
			$query="select * from runner join resultats on runner.id=FK_runner where sexe='M' AND distance='".$obj_utils->getSmalDistance()."' order by temp";
		break;
		case "woman5":
			$query="select * from runner join resultats on runner.id=FK_runner where sexe='F' AND distance='".$obj_utils->getSmalDistance()."' order by temp";
		break;
		case "general10":
			$query="select * from runner join resultats on runner.id=FK_runner where distance='".$obj_utils->getBigDistance()."' order by temp";
		break;
		case "man10":
			$query="select * from runner join resultats on runner.id=FK_runner where sexe='M' AND distance='".$obj_utils->getBigDistance()."' order by temp";
		break;
		case "woman10":
			$query="select * from runner join resultats on runner.id=FK_runner where sexe='F' AND distance='".$obj_utils->getBigDistance()."' order by temp";
		break;
		case "runnersAll":
			$query="select id from runner";
		break;
		case "runnersDone":
			$query="select FK_runner from resultats";
		break;
	}	
	return $query;
 $obj_utils->close();
}
	
?>